import java.util.Scanner;

public class Day7 {
    /**
     * 在字符串中找出连续最长的数字串
     */
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        String maxStr = "";
        String curStr = "";
        for (int i = 0; i < str.length(); i++) {
            if (Character.isDigit(str.charAt(i))) {
                curStr += str.charAt(i);
                if (i == str.length() - 1) {
                    if (curStr.length() > maxStr.length()) {
                        maxStr = curStr;
                    }
                }
            } else {
                if (curStr.length() > maxStr.length()) {
                    maxStr = curStr;
                }
                curStr = "";
            }
        }
        System.out.println(maxStr);
    }
}
